<?php
namespace Application\Model;

class Ipaddress
{	
	public $ip_id;
	public $ip_address;
	public $city_name;
	public $state_name;
	public $country_name;
	public function exchangeArray($data)
	{		
		$this->ip_id		= (isset($data['ip_id']))     	? $data['ip_id']			: null;
		$this->ip_address 	= (isset($data['ip_address'])) 	? $data['ip_address'] 		: null;
		$this->city_name	= (isset($data['city_name']))  	? $data['city_name']  		: null;
		$this->state_name 	= (isset($data['state_name']))	? $data['state_name']     	: null;
		$this->country_name = (isset($data['country_name']))? $data['country_name'] 	: null;
	}
	// Add the following method:
	public function getArrayCopy()
	{
		return get_object_vars($this);
	}

}